let { projectRootPath } = require("../../../util/index");
let { getNewApp } = require(`${projectRootPath}/app/index.js`);
let {
  createTask,
  getTaskByPagination,
  editTaskByUuid,
  removeTaskByUuid,
  getRoleByPagination,
  removeRoleByUuid,
  editRoleByUuid,
  getRoleByAll,
} = require(`${projectRootPath}/service/task/index.js`);
let { getPayByPagination, getAllPayByFormdata } = require(
  `${projectRootPath}/service/pay/index.js`,
);
let { getPatrolWithFormData } = require(
  `${projectRootPath}/service/patrol/index.js`,
);
let app = getNewApp();

// 获取缴费分页数据
app.post("/get", async (req, res) => {
  try {
    let result = await getPatrolWithFormData(req.body);
    res.send({ data: result, code: 20000 });
  } catch (error) {
    res.send({ data: {}, message: error.message, code: 20001 });
  }
});

module.exports = app;
